<%= form_for(resource, html: {class: 'form-signin'}, as: resource_name, url: registration_path(resource_name)) do |f| %>
  <%= render "devise/shared/error_messages", resource: resource %>
  <div class="text-center mb-4">
    <h1 class="h3 mb-3 font-weight-normal">注册</h1>
  </div>

  <div class="form-label-group">
    <%= f.label :email, "邮箱", class: 'sr-only' %><br/>
    <%= f.email_field :email, autofocus: true, autocomplete: "email", required: true, class: 'form-control', placeholder: "邮箱" %>
  </div>

  <div class="form-label-group">
    <%= f.label :password, "密码", class: 'sr-only' %>
    <% if @minimum_password_length %>
      <em>(最少 <%= @minimum_password_length %> 个字符)</em>
    <% end %><br/>
    <%= f.password_field :password, autocomplete: "new-password", required: true, class: 'form-control', placeholder: "密码" %>
  </div>

  <div class="form-label-group">
    <%= f.label :password_confirmation, "确认密码", class: 'sr-only' %><br/>
    <%= f.password_field :password_confirmation, autocomplete: "new-password", required: true, class: 'form-control', placeholder: "确认密码" %>
  </div>
  <%= f.submit "注册", class: 'btn btn-lg btn-primary btn-block', id: 'register-submit' %>
<% end -%>

<script>
    $('#register-submit').submit(function (a, b, c, d) {
        console.info(a, b, c, d)
        return false;
    })
</script>
<%= render "devise/shared/links" %>
